﻿using Dapper;
using System;
using BCEntity.OA.WorkSchedule.WorkScheduleChildrenTask;
using System.Collections.Generic;
using System.Data;
using System.Text;
using System.Threading.Tasks;

namespace BCData.OA.WorkSchedule.WorkScheduleChildrenTask
{
	/// <summary>
	/// 工作进度表子任务
	/// </summary>
	public interface IWorkScheduleChildrenTaskData
	{
		#region  成员方法
		/// <summary>
		/// 是否存在该记录
		/// </summary>
		/// <param name="workScheduleChildrenTaskId">工作进度表子任务Id</param>
		Task<bool> Exists(long workScheduleChildrenTaskId);
		/// <summary>
		/// 增加工作进度表子任务
		/// </summary>
		/// <param name="entity">工作进度表子任务信息</param>
		Task<WorkScheduleChildrenTaskEntity> Add(WorkScheduleChildrenTaskEntity entity);
		/// <summary>
		/// 更新工作进度表子任务
		/// </summary>
		/// <param name="entity">工作进度表子任务信息</param>
		Task<WorkScheduleChildrenTaskEntity> Update(WorkScheduleChildrenTaskEntity entity);
		/// <summary>
		/// 删除工作进度表子任务
		/// </summary>
		/// <param name="workScheduleChildrenTaskId">工作进度表子任务Id</param>
		Task<bool> Delete(long workScheduleChildrenTaskId);
		/// <summary>
		/// 获取工作进度表子任务
		/// </summary>
		/// <param name="workScheduleChildrenTaskId">工作进度表子任务Id</param>
		Task<WorkScheduleChildrenTaskEntity> GetEntity(long workScheduleChildrenTaskId);
		/// <summary>
		/// 获取工作进度表子任务列表
		/// </summary>
		/// <param name="workScheduleId">工作进度表Id</param>
		Task<IEnumerable<WorkScheduleChildrenTaskEntity>> GetList(long workScheduleId);
		/// <summary>
		/// 获取工作进度表子任务分页列表
		/// </summary>
		/// <param name="start">开始时间</param>
		/// <param name="end">结束时间</param>
		/// <param name="sortName">排序字段</param>
		/// <param name="ascending">升序</param>
		/// <param name="pageIndex">当前页码</param>
		/// <param name="pageSize">每页数据条数</param>
		Task<(IEnumerable<WorkScheduleChildrenTaskEntity>, int)> Query(DateTime? start, DateTime? end, string sortName, bool? ascending, int pageIndex, int pageSize);
		#endregion  成员方法
	}


}